/*
 * Package il.ac.biu.cs.grossmm.test.fooAdapters
 * File StringTriple.java
 * 
 * This is a part of presence service framework API. 
 * See javadoc for more information.
 *  
 * Copyright (C) 2006 Grossmann Mark
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
package il.ac.biu.cs.grossmm.tests.fooAdapters;

public class StringTriple {
	private final String a, b, c;

	/**
	 * @param a
	 * @param b
	 * @param c
	 */
	public StringTriple(String a, String b, String c)
	{
		super();
		this.a = a;
		this.b = b;
		this.c = c;
	}
	
	@Override
	public boolean equals(Object obj)
	{
		if( obj == null || !(obj instanceof StringTriple) )
			return false;
		
		StringTriple s = (StringTriple) obj;
		
		return (a==null ? s.a==null : a.equals(s.a))
			&& (b==null ? s.b==null : b.equals(s.b))
			&& (c==null ? s.c==null : c.equals(s.c));
	}
	
	@Override
	public int hashCode()
	{
		int ac = a == null ? 0 : a.hashCode()*961;
		int bc = b == null ? 0 : b.hashCode()*31;
		int cc = c == null ? 0 : c.hashCode();
		
		return ac+bc+cc;
	}
}
